package xyz.yuzegod.megawalls.event;

import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import xyz.yuzegod.megawalls.game.Game;
import xyz.yuzegod.megawalls.game.GamePlayer;

public class PlayerKillEvent extends Event
{
    private static final HandlerList handlers;
    private Game game;
    private GamePlayer killer;
    private GamePlayer player;
    private boolean finalKill;
    
    public PlayerKillEvent(final Game game, final GamePlayer killer, final GamePlayer player) {
        this(game, killer, player, false);
    }
    
    public PlayerKillEvent(final Game game, final GamePlayer killer, final GamePlayer player, final boolean finalKill) {
        this.game = null;
        this.killer = null;
        this.player = null;
        this.finalKill = false;
        this.game = game;
        this.killer = killer;
        this.player = player;
        this.finalKill = finalKill;
    }
    
    public static HandlerList getHandlerList() {
        return PlayerKillEvent.handlers;
    }
    
    public HandlerList getHandlers() {
        return PlayerKillEvent.handlers;
    }
    
    public Game getGame() {
        return this.game;
    }
    
    public GamePlayer getKiller() {
        return this.killer;
    }
    
    public GamePlayer getPlayer() {
        return this.player;
    }
    
    public boolean isFinalKill() {
        return this.finalKill;
    }
    
    static {
        handlers = new HandlerList();
    }
}
